<?php
/**
 * @package     RocketTheme
 * @subpackage  rokquickcart.install
 * @version   1.3 August 17, 2010
 * @author    RocketTheme, LLC http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2010 RocketTheme, LLC
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 *
 */
 // no direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');	
 



function com_install() {
	$db = JFactory::getDBO();
	return component_update($db);
}

function component_update($db) {
	$update_component_sql =
		"UPDATE #__components SET params='page_title=Our Products
			shelf_item_width=350
			shelf_image_width=100
			cart_item_height=200
			cart_image_width=60
			use_rokbox=1
			include_css=1
			tax=0
			tax_rate=0.00
			shipping=0
			shipping_type=items
			shipping_flat=0.00
			shipping_quantity=0.00
			shipping_percent=0.00
			checkout_method=PayPal
			paypal_email=change_this_to_your_paypal_email
			paypal_currency=USD
			googlecheckout_merchant_d=
			googlecheckout_currency=USD
			' WHERE name='RokQuickCart' and (params is NULL or params = '');";
	$db->setQuery($update_component_sql);
	if (!$db->query()) {
		$status->errormsg[] = $db->getErrorMsg();
		return false;
	}
	return true;
}
